# REQUIRES: amdgpu-registered-target
# RUN: llvm-reduce -simplify-mir --test FileCheck --test-arg --check-prefix=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
# RUN: FileCheck --check-prefix=RESULT %s < %t

# Test that the MIR parser successfully infers the target triple from
# the module and avoids needing the -mtriple flag.

# CHECK-INTERESTINGNESS: S_ENDPGM

# RESULT: name: func

--- |
  target triple = "amdgcn-amd-amdhsa"

  define void @func() {
    ret void
  }

...
---
name: func
tracksRegLiveness: true
body:             |
  bb.0:
    S_NOP 0
    S_ENDPGM 0
...
